<template>
  <div class="articleadd">
    <el-row class="tac">
      <el-col :span="12">
        <el-menu
          default-active="1"
          class="el-menu-vertical-demo"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b"
        >
          <el-menu-item index="1" @click="handleOpen('/articleadd')">
            <i class="el-icon-menu"></i>
            <span slot="title">文章发布</span>
          </el-menu-item>
          <el-menu-item index="2" @click="handleOpen('/articleadd')">
            <i class="el-icon-menu"></i>
            <span slot="title">文章查看</span>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
    <div>
        <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  name: "articleadd",
  data () {
      return {

      }
  },
  methods: {
    handleOpen(key) {
      this.$router.push('/url')
    }
  }
};
</script>

<style scoped>
.articleadd {
  width: 100%;
  height: 100%;
  display: flex;

}
</style>
<style>
.articleadd .el-menu {
    height: 100vh;
    width: 200px;
}
</style>